var QuestionTypeMap = {};
QuestionTypeMap.single = {
    id: "single",
    type: 1,
    typeid: 1,
    name: "单选题",
    description: "请选择"
};
QuestionTypeMap.multiple = {
    id: "multiple",
    type: 2,
    typeid: 1,
    name: "多选题",
    description: "请选择"
};
QuestionTypeMap.gridsingle = {
    id: "gridsingle",
    type: 41,
    typeid: 1,
    name: "每行单选题",
    description: "请选择"
};
QuestionTypeMap.gridmultiple = {
    id: "gridmultiple",
    type: 42,
    typeid: 1,
    name: "每行多选题",
    description: "请选择"
};
QuestionTypeMap.paragraph = {
    id: "paragraph",
    type: 6,
    typeid: 1,
    name: "多行文本题",
    description: "请输入"
};
QuestionTypeMap.blank = {
    id: "blank",
    type: 0,
    typeid: 1,
    name: "分节符",
    description: "分节符"
};
QuestionTypeMap.pagebreak = {
    id: "pagebreak",
    type: -1,
    typeid: 1,
    name: "分页符",
    description: "累的话，可以休息一下..."
};
QuestionTypeMap.color = {
    id: "color",
    type: 2,
    typeid: 3,
    name: "选择颜色题",
    description: "颜色题"
};
QuestionTypeMap.singleopen = {
    id: "singleopen",
    type: 6,
    typeid: 5,
    name: "单行文本题",
    description: "请输入"
};
QuestionTypeMap.name = {
    id: "name",
    type: 6,
    typeid: 7,
    name: "姓名",
    description: "请输入您的姓名"
};
QuestionTypeMap.address = {
    id: "address",
    type: 6,
    typeid: 8,
    name: "地址题",
    description: "请输入您的地址"
};
QuestionTypeMap.date = {
    id: "date",
    type: 6,
    typeid: 9,
    name: "日期",
    description: "请选择日期"
};
QuestionTypeMap.time = {
    id: "time",
    type: 6,
    typeid: 10,
    name: "时间",
    description: "请选择时间"
};
QuestionTypeMap.email = {
    id: "email",
    type: 6,
    typeid: 11,
    name: "电子邮件",
    description: "请输入您的电子邮件"
};
QuestionTypeMap.phone = {
    id: "phone",
    type: 6,
    typeid: 12,
    name: "电话",
    description: "请输入您的电话"
};
QuestionTypeMap.price = {
    id: "price",
    type: 6,
    typeid: 13,
    name: "价格",
    description: "请输入价格"
};
QuestionTypeMap.website = {
    id: "website",
    type: 6,
    typeid: 14,
    name: "网站链接",
    description: "请输入您的网站链接"
};
QuestionTypeMap.age = {
    id: "age",
    type: 1,
    typeid: 15,
    name: "年龄",
    description: "您的出生年月是？"
};
QuestionTypeMap.sex = {
    id: "sex",
    type: 1,
    typeid: 16,
    name: "性别",
    description: "请选择您的性别"
};
QuestionTypeMap.city = {
    id: "city",
    type: 1,
    typeid: 17,
    name: "地区",
    description: "请选择您的地区"
};
QuestionTypeMap.score = {
    id: "score",
    type: 1,
    typeid: 18,
    name: "评分题",
    description: "评分题"
};
var QuestionType = new Array();
QuestionType[0] = {
    list: ["single", "multiple", "gridsingle", "gridmultiple", "singleopen", "paragraph", "blank", "pagebreak"]
};
QuestionType[1] = {
    list: ["score", "color", "age", "sex", "name", "address", "phone", "email", "date", "time", "website", "price", "city"]
};
var QuestionFormat = {};
QuestionFormat.small = {
    format: 1,
    name: "小"
};
QuestionFormat.middle = {
    format: 2,
    name: "中"
};
QuestionFormat.large = {
    format: 3,
    name: "大"
};
QuestionFormat.call = {
    format: 4,
    name: "国际电话"
};
QuestionFormat.mobile = {
    format: 5,
    name: "手机号码"
};
QuestionFormat.ymd = {
    format: 6,
    name: "年-月-日"
};
QuestionFormat.ym = {
    format: 7,
    name: "年-月"
};
QuestionFormat.v1 = {
    format: 8,
    name: "竖向1列"
};
QuestionFormat.v2 = {
    format: 9,
    name: "竖向2列"
};
QuestionFormat.v3 = {
    format: 10,
    name: "竖向3列"
};
QuestionFormat.v4 = {
    format: 11,
    name: "横向排列"
};
QuestionFormat.select = {
    format: 12,
    name: "下拉菜单"
};
function getQuestionName(e) {
    var c = "";
    for (var d = 0; d < 2; d++) {
        var f = QuestionType[d].list;
        for (var b = 0; b < f.length; b++) {
            var a = QuestionTypeMap[f[b]];
            if (e.type == a.type && e.typeid == a.typeid) {
                c = a.name;
                break
            }
        }
    }
    return c
}
function getDefaultQuestion(e) {
    var b = {};
    for (var d = 0; d < 2; d++) {
        var f = QuestionType[d].list;
        for (var c = 0; c < f.length; c++) {
            var a = QuestionTypeMap[f[c]];
            if (e.type == a.type && e.typeid == a.typeid) {
                b = a;
                break
            }
        }
    }
    return b
}
function isSingleQuestion(a) {
    return isQuestionType("single", a.type, a.typeid)
}
function isMultipleQuestion(a) {
    return isQuestionType("multiple", a.type, a.typeid)
}
function isGridsingleQuestion(a) {
    return isQuestionType("gridsingle", a.type, a.typeid)
}
function isGridmultipleQuestion(a) {
    return isQuestionType("gridmultiple", a.type, a.typeid)
}
function isSingleopenQuestion(a) {
    return isQuestionType("singleopen", a.type, a.typeid)
}
function isParagraphQuestion(a) {
    return isQuestionType("paragraph", a.type, a.typeid)
}
function isBlankQuestion(a) {
    return isQuestionType("blank", a.type, a.typeid)
}
function isPagebreakQuestion(a) {
    return isQuestionType("pagebreak", a.type, a.typeid)
}
function isScoreQuestion(a) {
    return isQuestionType("score", a.type, a.typeid)
}
function isColorQuestion(a) {
    return isQuestionType("color", a.type, a.typeid)
}
function isAgeQuestion(a) {
    return isQuestionType("age", a.type, a.typeid)
}
function isSexQuestion(a) {
    return isQuestionType("sex", a.type, a.typeid)
}
function isNameQuestion(a) {
    return isQuestionType("name", a.type, a.typeid)
}
function isAddressQuestion(a) {
    return isQuestionType("address", a.type, a.typeid)
}
function isPhoneQuestion(a) {
    return isQuestionType("phone", a.type, a.typeid)
}
function isEmailQuestion(a) {
    return isQuestionType("email", a.type, a.typeid)
}
function isDateQuestion(a) {
    return isQuestionType("date", a.type, a.typeid)
}
function isTimeQuestion(a) {
    return isQuestionType("time", a.type, a.typeid)
}
function isWebsiteQuestion(a) {
    return isQuestionType("website", a.type, a.typeid)
}
function isPriceQuestion(a) {
    return isQuestionType("price", a.type, a.typeid)
}
function isCityQuestion(a) {
    return isQuestionType("city", a.type, a.typeid)
}
function isQuestionType(c, b, a) {
    return (b == QuestionTypeMap[c].type && a == QuestionTypeMap[c].typeid)
};